﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace RiskMan.DataClass.AlfaDirectFolder
{
    /// <summary>
    /// ТАБЛИЦА «QUEUE» - ОЧЕРЕДИ ЗАЯВОК
    /// Ключевое поле: price
    /// </summary>
    class Queue : INotifyPropertyChanged
    {
        #region Private

        private int _paperNo;
        private double _price;
        private int _buyQty;
        private int _sellQty;
        private int iLastUpdate;
        private double _yield;


        #endregion

        #region Public

        /// <summary>
        /// 
        /// </summary>
        public int PaperNo
        {
            get { return _paperNo; }
            set
            {
                if (_paperNo != value)
                    _paperNo = value;

                RaisePropertyChanged("PaperNo");
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public double Price
        {
            get { return _price; }
            set
            {
                if (_price != value)
                    _price = value;

                RaisePropertyChanged("Price");
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int BuyQty
        {
            get { return _buyQty; }
            set
            {
                if (_buyQty != value)
                    _buyQty = value;

                RaisePropertyChanged("BuyQty");
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int SellQty
        {
            get { return _sellQty; }
            set
            {
                if (_sellQty != value)
                    _sellQty = value;

                RaisePropertyChanged("SellQty");
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int ILastUpdate
        {
            get { return iLastUpdate; }
            set
            {
                if (iLastUpdate != value)
                    iLastUpdate = value;

                RaisePropertyChanged("ILastUpdate");
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public double Yield
        {
            get { return _yield; }
            set
            {
                if (_yield != value)
                    _yield = value;

                RaisePropertyChanged("Yield");
            }
        }

    
        #endregion

        #region event PropertyChangedEventHandler

        public event PropertyChangedEventHandler PropertyChanged;

        protected void RaisePropertyChanged(string propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        #endregion
    }
}
